export default {
  inserted(el, binding) {
    const modes = Object.keys(binding.modifiers)
    const elStyle = getComputedStyle(el)
    if (!['auto', 'hidden', 'scroll'].includes(elStyle.overflow)) el.style.overflow = 'auto'
    if (modes.includes('both') || (modes.includes('horizontal') && modes.includes('vertical')) || !modes.length) {
      el.style.resize = 'both'
    } else if (modes.includes('horizontal')) {
      el.style.resize = 'horizontal'
    } else if (modes.includes('vertical')) {
      el.style.resize = 'vertical'
    }
  },
}
